<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">


<ui:composition template="/templates/fornecedor.xhtml">

	<ui:define name="menu">
		<ui:include src="/fornecedor/menu.xhtml" />
	</ui:define>

	<ui:define name="conteudo">
		<div id="texto">

			<h2>Alterar Cliente</h2>
		</div>

		<h:form id="form">
			<p:growl id="growl" showDetail="false" />

			<h:inputHidden value="#{clienteBean.buscarGeralCliente()}" />

			<p:accordionPanel>
				<p:tab title="Dados do cliente">
					<p:fieldset>

						<div style="padding-left: 30px; float: left; margin-top: 10px;">

							<p:panel id="pnlConsultaDia">


								<h:panelGrid columns="5">
									<h:outputLabel value="Nome : * " for="nome"
										style="font-weight:bold" />
									<h:outputText value="#{clientes.nome}" />
									<p:inputText id="nome" label="Nome" />

									<span id="erro"> <h:message for="nome" /></span>

								</h:panelGrid>
									
									<h:panelGrid columns="4">
								    <h:outputLabel value="CNPJ : *" style="font-weight:bold" color="blue"/>								    
									<p:inputText value="#{clienteBean.clienteSelecionado.cpfCnpj}"/>									
 																		 
								    <h:outputText value="#{clienteBean.getCNPJ()}" />
								    
									</h:panelGrid>


								<h:panelGrid columns="4">
									<h:outputLabel value="Endereco : * " for="endereco"
										style="font-weight:bold" />
									<p:inputText id="endereco" label="endereco"
										value="#{clienteBean.cliente.endereco}" required="true"
										requiredMessage="Informe o seu endereco" size="30"
										style="heght:30px;" />
									<span id="erro"> <h:message for="endereco" /></span>
								</h:panelGrid>

								<h:panelGrid columns="4">
									<h:outputLabel value="Email: * " for="email"
										style="font-weight:bold" />
									<p:inputText id="email" label="email"
										value="#{clienteBean.cliente.email}" required="true"
										requiredMessage="Informe e-mail" size="30" style="heght:30px;" />
									<span id="erro"> <h:message for="email" /></span>
								</h:panelGrid>

								<h:panelGrid columns="4">
									<h:outputLabel value="Sexo : * " for="sexo"
										style="font-weight:bold" />
									<p:inputText id="sexo" label="sexo"
										value="#{clienteBean.cliente.sexo}" required="true"
										requiredMessage="Informe sexo" size="30" style="heght:30px;" />
									<span id="erro"> <h:message for="sexo" /></span>
								</h:panelGrid>

								<h:panelGrid columns="4">
									<h:outputLabel value="Carteira de habilitação: * " for="catHab"
										style="font-weight:bold" />
									<p:inputText id="catHab" label="catHab"
										value="#{clienteBean.cliente.catHab}" required="true"
										requiredMessage="Informe carteira de hobilitação" size="30"
										style="heght:30px;" />
									<span id="erro"> <h:message for="endereco" /></span>
								</h:panelGrid>

								<h:panelGrid columns="4">
									<h:outputLabel value="Estado Emissor : * " for="estadoEmissor"
										style="font-weight:bold" />
									<p:inputText id="estadoEmissor" label="estadoEmissor"
										value="#{clienteBean.cliente.estadoEmissor}" required="true"
										requiredMessage="Informe o seu endereco" size="30"
										style="heght:30px;" />
									<span id="erro"> <h:message for="endereco" /></span>
								</h:panelGrid>


								<h:panelGrid columns="4">
									<h:outputLabel value="Passaporte: * " for="passaporte"
										style="font-weight:bold" />
									<p:inputText id="passaporte" label="passaporte"
										value="#{clienteBean.cliente.passaporte}" required="true"
										requiredMessage="Informe passaporte" size="30"
										style="heght:30px;" />
									<span id="erro"> <h:message for="email" /></span>
								</h:panelGrid>



								<h:panelGrid columns="4">
									<h:outputLabel value="Telefone: * " for="telefone"
										style="font-weight:bold" />
									<p:inputText id="telefone" label="telefone"
										value="#{clienteBean.cliente.telefone}" required="true"
										requiredMessage="Informe telefone" size="30"
										style="heght:30px;" />
									<span id="erro"> <h:message for="email" /></span>
								</h:panelGrid>


							</p:panel>

						</div>

					</p:fieldset>
				</p:tab>

			</p:accordionPanel>

			<br></br>
			<h:panelGroup>
				<h:commandButton value="Salvar" action="#{clienteBean.salvar}"
					style="height: 30px;" />
			</h:panelGroup>
		</h:form>

	</ui:define>
</ui:composition>
</html>